﻿namespace Yipusoft.BaseDoc
{
    using System;
    using System.Data;
    using System.Data.Linq;
    using System.Data.Linq.Mapping;

    [Database(Name="FireMIS")]
    public class BaseDocDataContext : DataContext
    {
        private static MappingSource mappingSource = new AttributeMappingSource();

        public BaseDocDataContext() : base(ConfigurationSettings.AppSettings["ConnectionString"].ToString(), mappingSource)
        {
        }

        public BaseDocDataContext(IDbConnection connection) : base(connection, mappingSource)
        {
        }

        public BaseDocDataContext(string connection) : base(connection, mappingSource)
        {
        }

        public BaseDocDataContext(IDbConnection connection, MappingSource mappingSource) : base(connection, mappingSource)
        {
        }

        public BaseDocDataContext(string connection, MappingSource mappingSource) : base(connection, mappingSource)
        {
        }

        public Table<Yipusoft.BaseDoc.BaseDocFiles> BaseDocFiles
        {
            get
            {
                return base.GetTable<Yipusoft.BaseDoc.BaseDocFiles>();
            }
        }

        public Table<Yipusoft.BaseDoc.BaseDocs> BaseDocs
        {
            get
            {
                return base.GetTable<Yipusoft.BaseDoc.BaseDocs>();
            }
        }

        public Table<Yipusoft.BaseDoc.BaseDocType> BaseDocType
        {
            get
            {
                return base.GetTable<Yipusoft.BaseDoc.BaseDocType>();
            }
        }
    }
}

